<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <ul></ul>
    <script>
        var person = [
            { name: '张三', sex: '男', age: 18 },
            { name: '李四', sex: '女', age: 19 },
            { name: '王五', sex: '男', age: 20 },
        ];
        var str = '';
        person.forEach((i) => {
            str += `<li>${i.name}-${i.sex}-${i.age}</li>`;
        });
        var ul = document.getElementsByTagName('ul')[0];
        ul.innerHTML = str;
    </script>
</body>

</html>